//
//  CLCustomButton.h
//  IntegralMall
//
//  Created by 朱跃龙 on 2017/9/28.
//  Copyright © 2017年 朱跃龙. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger,CLCustomButtonType) {
    CLCustomButtonLeftImageType,//左图标，右文字
    CLCustomButtonTopImageType,//上图标，下文字
    CLCustomButtonRightImageType//右图标，左文字
};

@interface CLCustomButton : UIView

@property (nonatomic, strong) UIImageView *imageView;
@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic, assign) BOOL selected;

@property (nonatomic, assign) BOOL isShowSelectBackgroudColor;//是否展示点击效果

@property (nonatomic, copy)void(^touchBlock)(CLCustomButton *button);


/*
 初始化
 imageSize  图标大小
 isAutoWidth 是否根据文字长度自适应
 */
- (id)initWithFrame:(CGRect)frame
               type:(CLCustomButtonType)type
          imageSize:(CGSize)imageSize
          midmargin:(CGFloat)midmargin;

//点击响应
- (void)touchAction:(void(^)(CLCustomButton *button))block;


NS_ASSUME_NONNULL_END


@end
